export interface ToolsReqData {
  cateId: number,
  title: string,
  route: string,
}

// 路由元信息
export interface RouteMeta extends Record<string | number | symbol, unknown> {
  title: string;
  keywords: string;
  description: string;
}

// 工具信息
export interface ToolsInfo {
  id: string, // 改为string作为唯一标识
  title: string,
  logo: string,
  desc: string,
  url: string,
  cateId: number,
  cate: string,
  component: string, // 新增：组件路径
  routeName: string, // 新增：路由名称
  meta: RouteMeta, // 新增：路由元信息
}

// 工具分类
export interface ToolCate {
  id: number,
  title: string,
  icon: string,
  list: ToolsInfo[]
}

export interface CollectReqData {
  toolId: string // 改为string，与ToolsInfo.id保持一致
}

// 工具搜索参数
export interface ToolSearchParams {
  cateId?: number;
  title?: string;
  keyword?: string;
}

//tools list response
export interface ToolsResponseData {
  data: ToolsInfo[]
}

//tools cate response
export interface ToolCateResponseData{
  data: ToolCate[]
}

//tools recommend response
export interface ToolRecommendResponseData{
  data: ToolsInfo[]
}

// 路由生成相关类型
export interface RouteConfig {
  path: string;
  component: string;
  name: string;
  meta: RouteMeta;
}

// 工具分类枚举
export enum ToolCategory {
  RECOMMENDED = 100,
  DEVELOPMENT = 2,
  TEXT_PROCESSING = 3,
  EDUCATION = 4,
  IMAGE_PROCESSING = 5,
  DATA_CHART = 8,
  RANDOM_CHOICE = 9,
  OTHER_TOOLS = 7,
}